import { Card, WhiteSpace } from 'antd-mobile'
import React, { ReactElement } from 'react'
import styles from './index.less'
import classnames from 'classnames'

interface Props {
    count: number,
    id?: string,
    img: string,
    price: string,
    title: string
}

export default function NodeListPage({ count, id, img, price, title }: Props): ReactElement {
    return (
        <>
            <WhiteSpace size='lg'></WhiteSpace>
            <Card className={styles.main}>
                <div className={styles.imgBox}>
                    <img src={img} alt={title} />
                </div>
                <div className={styles.right}>
                    <div className={classnames('twoRows')}>{title}</div>
                    <div className={styles.info}>
                        <p className={classnames('red', 'font14')}>${price}</p>
                        <span className='font12'>x {count}</span>
                    </div>
                </div>
            </Card>
        </>
    )
}
